#!/usr/bin/env bash

PREFIX=$(realpath $(cd "$(dirname "$0")"; pwd))

cd $PREFIX
git log --pretty=format:"%t" -1 > meta
sync() {
    git add -u && git commit -m '.' ;
    local branch=`git branch 2> /dev/null | sed -e '/^[^*]/d' |awk -F' ' '{print $2}'`
    git pull origin $branch && git push origin $branch;
}
sync
